package com.hj.user.controller;

import com.hj.user.service.UserInfoManagerImpl;

import java.util.Scanner;

public class Test {
    public static final Scanner INPUT = new Scanner(System.in);
    public static void main(String[] args) {
        UserInfoManagerImpl userInfoManager = new UserInfoManagerImpl();
        outer:
        while (true) {
            userInfoManager.mainMenu();
            int choice = INPUT.nextInt();
            switch (choice) {
                case 1:
                    userInfoManager.searchAll();
                    break;
                case 2:
                    userInfoManager.deleteUserInfo();
                    break;
                case 3:
                    userInfoManager.addUserInfo();
                    break;
                case 4:
                    System.out.println("谢谢使用！");
                    break outer;
                default:
                    System.err.println("输入有误");
                    System.out.println();
                    break;
            }
        }
    }
}
